function createGame(width, height) {
	
	function createPlayer(handlers){
	        return {
	                win : function (message) {
	                        handlers['win'](message);
	                },
	                lose : function (gameJson) {
				this.update(gameJson);
	                        handlers['lose']();
	                },
	                update : function (gameJson) {
	                        handlers['update'](gameJson);
	                },
	                error : function(message){
	                        handlers["error"](message);
	                }
	        }
	}

	var handlers = [];
	var game = new model.Game(createPlayer(handlers), width, height, utils.createMineFieldDesigner());
	return {
			on : function(eventName, fn){
				handlers[eventName] = fn;
			},
			touch : function(coords){
				game.touch(coords);
			},
			slam : function(coords) {
				game.slam(coords); 
			},
			flag : function(coords) {
				game.flag(coords);	   
			}
		}

}

